import axios from 'axios'
import { Storage } from '../../storage'

const getCourseInMyClass = () => axios.get('/api/course/in/myclass', {
    headers: {
        "nothing-token": Storage.get("nothing-token")
    }
}).then(res => res.data)

const getCourseInfoById = courseId => axios.get(`/api/course/info/${courseId}`).then(res => res.data)


const getNotice = courseId => axios.get(`/api/notice/get/${courseId}`).then(res => res.data)

const putRecord = (form) => axios.post(`/api/message-record/put`, form, {
    headers: {
        "nothing-token": Storage.get("nothing-token")
    }
}).then(res => res.data)

export {
    getCourseInMyClass,
    getCourseInfoById,
    getNotice,
    putRecord
}